﻿using System.Windows.Forms;
using SourceGrid;

namespace ZeBobo5.LibraryHelper.Core.Grid
{
    public abstract class GridBase : SourceGrid.Grid
    {
        protected GridBase()
        {
            ClipboardMode = ClipboardMode.All;
            BorderStyle = BorderStyle.FixedSingle;
        }

        public abstract void Clear();

        public void SetColumnWidth(int index, int width)
        {
            GetColumn(index).Width = width;
        }

        public GridColumn GetColumn(int index)
        {
            return Columns[index];
        }

        public GridRow GetRow(int index)
        {
            return Rows[index];
        }
    }
}